<template>
  <div>
    Filter
    <p>{{price | moneyChange}}</p>
    <p>{{info | contextData}}</p>
    <ul>
      <li><router-link to="/filter/style">style</router-link></li>
      <li><router-link to="/filter/big">Big</router-link></li>
    </ul>
    <router-view />
  </div>
</template>

<script>
export default {
  name: "filter",
  data() {
    return {
      price:30,
      info:"我是我呀"
    };
  },
  filters:{
      moneyChange(value){
          if (typeof value=== "number") {
              return "$" +value
          }
          return value
      },
      contextData(value){
          return value+"---来自赵赵---" + new Date()
      }
  }
};
</script>

<style scoped>

</style>